package com.Jin.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Comparator;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class User {
    private int id;
    private String account;
    private String password;
    private String sex;
    private String name;
    private String age;
    private String address;
    private String number;
    private String identifyID;  //身份证号
    private String identify;    //权限

    //比较规则
    public static class Comparators{
        public static Comparator<User> ID = new Comparator<User>() {
            @Override
            public int compare(User a, User b) {
                return Integer.compare(a.id, b.id);
            }
        };
    }
}
